pp108 : Configuring Websphere MQ as JMS Provider using LDAP

Configuring Websphere MQ as JMS Provider using LDAP

This topic describes the procedure to configure Websphere MQ as JMS Provider using LDAP .


Business applications make use of 'Enterprise Messaging' that provides a secure and reliable way of communication between disparate systems. IBM's Websphere MQ (WMQ) framework is based on messages stored on queues and queue managers that can reside on any machine. JMS applications perform service look up through JNDI, that provides a standard interface on all directories ranging from LDAP to DNS.

JMS transport in Process Platform is currently confined to file system context manager for WebSphere MQ. The limitation therefore is that it works only when MQSeries is installed on Process Platform Server. Configuring Websphere MQ as a JMS provider using LDAP helps overcomes this. The provider-specific information such as the 'connection factories' and 'destinations' are stored on LDAP. The JMS does a look up for these objects for connecting to the message provider.

The steps to configure Websphere MQ as a JMS Provider using LDAP have been described below.

1. Adding Schema

Add a new schema by making an entry in the slapd.conf file located in the bin directory of the installation directory of the Process Platform Admin Repository Server. In this slapd.conf file, an entry must be made as follows:

include <Installation Directory>/schema/java.schema

Here java.schema is the name of the schema file. Place java.schema file (located in the OpenText CARS installation directory) in the schemadirectory.

Restart slapd by typingnet start OpenLDAP-slapdatin the command prompt.

2. Download jmsadmingui or jmsadmintool for Configuring JNDI

Download jmsadmingui.bat or jmsadmintool.

Include the following .jar files in the classpath:

  • jmsadmingui.jar contained in jmsadmingui installation directory, example, <Process_Platform_Installation_Directory>\IBM\Websphere\ms0n
  • All the jar files contained within your <WebSphere MQ>/java/lib directory

From the command line, type the following:

java com.ibm.mq.jms.admin.JMSAdminGUI

This starts the GUI.

3. Using the Tool

a. On running the tool, the JNDI configuration screen appears.

!jms12.gif!

In the screen above, two parameters must be provided to establish a connection with the name or directory using JNDI:

  • Provider URL - This is the name or the URL for the directory server or the LDAP. This URL specifies the protocol and location of the repository. If the server is LDAP, the URL format must be ldap://ldap.server.com:port/cn=Data. If you want to connect to a specific Organization, you must specify this in the URL. For example, if you want to connect to LDAP Server 'foo' with Organization as Acme, the URL would look like this ldap://foo:389/o=acmen
    Note:Depending on LDAP's configuration with SSL, URL can be one of the following:

    IF

    Then

    LDAP is configured with SSL as follows bus.ldap.processor.ssl = true

    URL format isldaps://ldap.server.com:port/cn=Data

    LDAP is not configured with SSL as follows bus.ldap.processor.ssl = false

    URL format isldap://ldap.server.com:port/cn=Data

  • Initial Context Factory - This class is provided by the directory service provider that connects to the server. If you want to store the queue information on LDAP Server, then com.sun.jndi.ldap.LdapCtxFactory must be selected.
  • Authentication Mode - This is the security setting either set to None, Simple or CRAM-MD5. The security setting depends on how the directory server is configured. Most of the times, simple authentication mode is required.
  • Name Prefix - Provide the prefix for the objects in the repository.

b. If you want to create a new context under the Context Factory, select the option from the menu object > new > context

!jms7.gif!

c. A queue connection factory is needed for creating connections to the queue manager. You can create one from the menu object > new > MQQueueConnectionFactory and enter the name in the Object identification tab. This name will be used for configuring the JMS connection point in Process Platform.

!jms8.gif!

In the Standard Properties tab, enter the name of the Websphere MQ queue manager that this factory will connect to in the Queue Manager field. The remaining properties are optional. Click OK to continue.

!jms9.gif!

d. A queue is needed to store messages. You can create a queue from the menu object > new > MQQueue. Set the name in the Object identification tab and this name will be used for the configuration of JMS connection point in Process Platform.

!jms10.gif!

Set the Queue to the name of the physical queue in Websphere MQ and the Queue Manager to the Websphere MQ queue manager that the queue resides on. Click OK to continue.

e. Provide JMS Configuration Details in Process Platform.

Create a Service Container using the System Resouce Manager task. In the Provide Connection Point Details window, provide the following details:

  • JMS Vendor - The type of JMS implementation being used (this could be J2EE, OpenJMS, IBM MQ Series or Other). In case Other is selected as the JMS Vendor, then a field is displayed to specify the Service Provider Class. The Service Provider Class is a Java class provided by the implementation software to connect to the queue server.
  • Provider URL- The URL in the form ofprotocol://<server name>:<port name>.
    • For J2EE, this would be iiop://<Server Machine Name>:<default PortNumber>.
    • For OpenJMS, this would be rmi://<Server Machine Name>:<Default Port Number>/JndiServer.
    • For IBM MQ Series, this would be <<[file:\C:]<installationDirectory>>>.
  • Factory - A connection factory is used to create a connection to the JMS provider. The administrator uses the connection configuration parameters to create this connection.
  • Queue - The destination object where the message is to be sent (or received from).
  • Authentication Type - The type of authentication to be followed for the JMS server. None specifies anonymous authentication, while Simple and Strong are the different security levels for the JMS servers. If you select either Simple or Strong, then you must specify the Username and Password for authentication.

Related tasks

Configuring IBM MQSeries as the Messaging Service for Process Platform
Configuring JMS or MSMQ as the Messaging Service Using Client Connection Point Groups